import Toolbar from "@/components/ViewComponents/Toolbar";
import "./index.less";
import { BasicForm, FormSchema, useForm } from "@/components/Form";
import { Avatar } from "antd";
import { UserOutlined } from "@ant-design/icons";
import { useTranslation } from "react-i18next";
const index = () => {
	const { t } = useTranslation();
	const en_vi = "Hospitalization.surgeryProceduresImport";
	//患者个人信息
	const patientInformationSchemas: FormSchema[] = [
		{
			label: t(`${en_vi}.patient`),
			field: "Patient", //患者
			component: "Input"
		},
		{
			label: t(`${en_vi}.department`),
			field: "Department", //科室
			component: "Select"
		},
		{
			label: t(`${en_vi}.roomNumber`),
			field: "RoomNumber", //房间号
			component: "Input"
		},
		{
			label: t(`${en_vi}.type`),
			field: "Type", //类型
			component: "Select"
		},
		{
			label: t(`${en_vi}.patientId`),
			field: "PatientID", //病人代码
			component: "Input"
		},
		{
			label: t(`${en_vi}.fullName`),
			field: "FullName", //姓名
			component: "Input"
		},
		{
			label: t(`${en_vi}.gender`),
			field: "Gender", //性别
			component: "Select"
		},
		{
			label: t(`${en_vi}.age`),
			field: "Age", //年龄
			component: "Input"
		}
	];
	const [patientInformationRegister] = useForm({
		schemas: patientInformationSchemas,
		labelWidth: 120,
		showActionButtonGroup: true,
		baseColProps: {
			span: 6
		},
		actionColOptions: {
			span: 24
		}
	});
	//手术信息
	const surgicalInformationSchemas: FormSchema[] = [
		{
			label: t(`${en_vi}.surgicalTime`),
			field: "surgical", //手术时间
			component: "DatePicker"
		},
		{
			label: t(`${en_vi}.time`),
			field: "Time", //小时时间
			component: "DatePicker"
		},
		{
			label: t(`${en_vi}.to`),
			field: "To", //到什么时间
			component: "DatePicker"
		},
		{
			label: t(`${en_vi}.toTime`),
			field: "ToTime", //到什么小时时间
			component: "DatePicker"
		},
		{
			label: t(`${en_vi}.endOfAngioplasty`),
			field: "End", //心率
			component: "Input"
		},
		{
			label: t(`${en_vi}.temperature`),
			field: "Temperature", //体温
			component: "Input"
		},
		{
			label: t(`${en_vi}.bloodPressure`),
			field: "BloodPressure:", //血压
			component: "Input"
		},
		{
			label: t(`${en_vi}.sendForGeneralPathologyBloodTest`),
			field: "millimeters:", //是否已提取血液样本
			component: "Select"
		},
		{
			label: t(`${en_vi}.diagnosisForAdmissionToDepartment`),
			field: "Diagnosis:", //入院科室诊断
			component: "Input"
		},
		{
			label: t(`${en_vi}.preoperativeDiagnosis`),
			field: "PreoperativeDiagnosis", //术前诊断
			component: "Input"
		},
		{
			label: t(`${en_vi}.postoperativeDiagnosis`),
			field: "PostoperativeDiagnosis", //术后诊断
			component: "Input"
		},
		{
			label: t(`${en_vi}.notesProgress`),
			field: "Notes", //备注
			component: "Input"
		},
		{
			label: t(`${en_vi}.surgicalMethod`),
			field: "SurgicalMethod:", //手术方法
			component: "Input"
		},
		{
			label: t(`${en_vi}.practicalMethod`),
			field: "PracticalMethod::", //实际方法
			component: "Input"
		},
		{
			label: t(`${en_vi}.anesthesiaMethod`),
			field: "AnesthesiaMethod", //麻醉方法
			component: "Input"
		},
		{
			label: t(`${en_vi}.ptvMain`),
			field: "PTV", //主要治疗方案:
			component: "Input"
		},
		{
			label: t(`${en_vi}.ptvMain1`),
			field: "PTV1", //辅助治疗方案1
			component: "Input"
		},
		{
			label: t(`${en_vi}.ptvMain2`),
			field: "PTV2", //辅助治疗方案2
			component: "Input"
		}
	];
	const [surgicalInformationRegister] = useForm({
		schemas: surgicalInformationSchemas,
		labelWidth: 120,
		showActionButtonGroup: false,
		baseColProps: {
			span: 6
		},
		actionColOptions: {
			span: 24
		}
	});
	//术后评估
	const avatarSchemas: FormSchema[] = [
		{
			label: t(`${en_vi}.anesthesiologist`),
			field: "Anesthesia", //麻醉师
			component: "Input"
		},
		{
			label: t(`${en_vi}.condition`),
			field: "Condition", //病情
			component: "Input"
		},
		{
			label: t(`${en_vi}.complication`),
			field: "Complication", //并发症”
			component: "Input"
		},
		{
			label: t(`${en_vi}.death`),
			field: "Death", //是否死亡
			component: "Select"
		},
		{
			label: t(`${en_vi}.decision`),
			field: "Decision", //决定
			component: "Select"
		},
		{
			label: t(`${en_vi}.paymentType`),
			field: "PaymentType", //费用类型
			component: "Select"
		},
		{
			label: t(`${en_vi}.origin`),
			field: "Origin", //来自
			component: "Input"
		},
		{
			label: t(`${en_vi}.asa`),
			field: "ASA", //ASA分类（麻醉评估）
			component: "Input"
		},
		{
			label: t(`${en_vi}.para`),
			field: "PARA", //产次
			component: "Input"
		},
		// {
		// 	label: "Complications",
		// 	field: "Complications", //是否存在并发症
		// 	component: "Select"
		// },
		{
			label: t(`${en_vi}.laparoscopicSurgery`),
			field: "LaparoscopicSurgery", //是否已做组织检查
			component: "Select"
		},
		{
			label: t(`${en_vi}.reoperationExempted`),
			field: "ReoperationExempted", //免疫组织是否正常
			component: "Select"
		},
		{
			label: t(`${en_vi}.preoperativeChecklist`),
			field: "PreoperativeChecklist", //组织前的检查正常
			component: "Select"
		},
		{
			label: t(`${en_vi}.reasonForReturn`),
			field: "Reason", //24小时内返回组织室的原因
			component: "Select"
		},
		{
			label: t(`${en_vi}.chiefSurgeon`),
			field: "ChiefSurgeon", //主要治疗方案
			component: "Input"
		},
		{
			label: t(`${en_vi}.assistantSurgeon`),
			field: "Assistant", //附加治疗方案
			component: "Input"
		},
		{
			label: t(`${en_vi}.primaryAnesthetist`),
			field: "PrimaryAnesthetist", //主要管理
			component: "Input"
		},
		{
			label: t(`${en_vi}.assistantAnesthetist`),
			field: "AssistantAnesthetist", //附加管理
			component: "Input"
		},
		{
			label: t(`${en_vi}.assistantWork`),
			field: "assistantWork", //辅助工作
			component: "Input"
		},
		{
			label: t(`${en_vi}.preventionOfPostpartumHemorrhage`),
			field: "Prevention", //预防保健服务
			component: "Input"
		},
		{
			label: t(`${en_vi}.reason`),
			field: "Reason", //原因
			component: "Input"
		}
	];
	const [avatarRegister] = useForm({
		schemas: avatarSchemas,
		labelWidth: 120,
		showActionButtonGroup: false,
		baseColProps: {
			span: 6
		},
		actionColOptions: {
			span: 24
		}
	});
	const handlerToolbarAction = (key: string) => {
		console.log(key);
	};
	return (
		<div>
			<div className="page surgeryProceduresImport">
				<div className="page-content">
					<div className="block">
						<div className="flex">
							<BasicForm register={patientInformationRegister}></BasicForm>
							<div style={{ width: "700px", height: "200px", backgroundColor: "red" }}></div>
						</div>
						<div>
							<BasicForm register={surgicalInformationRegister}></BasicForm>
						</div>
						<div className="flex">
							<div className="Avatar">
								<Avatar shape="square" size={64} icon={<UserOutlined />} />
							</div>
							<div>
								<BasicForm register={avatarRegister}></BasicForm>
							</div>
						</div>
					</div>
				</div>
				<Toolbar action={handlerToolbarAction} btnList={["save"]} />
			</div>
		</div>
	);
};
export default index;
